"I didn't mean to start a controversy with my 'die' comment"
But you didn't
![[Linked Image]](https://ubbdev.com/ubb/smilies/smile.gif)
You did spark a discussion of methods and preferences, not a controversy. That would imply a different intent that is not present here.
![[Linked Image]](https://ubbdev.com/ubb/smilies/smile.gif)
(hint on translating Markisms: Just because he is not wordy sometimes doesn't mean he was giving you a slapdown. He might just have been real busy at the time, when he IS giving you a slapdown it is usually painfully obvious)
"If a script is intended for use by yourself, or other programmers, then a message like "Incorrect file type at line 123 myscript.cgi" may be fine. If the script is intended for use by Mr. Average Websurfer, then I would prefer to handle the error in a way that provides the user with information that he understands."
That's what you did here:
die 'Image file type must be either .gif or .jpg';
Seems just as effective to me as spinning out a fancy webpage with the error message then exit; just not a nice looking.
howabout die 'Image file type must be either .gif or .jpg, hit your backbutton'; ?
You *could* always do it the UBB way, make a sub to pass messages like StandardHTML but for smaller scripts it seems like overkill to me.
I use die 'message'; in everything I write except the UBB. But then again all of the stuff I write for my own websites are a lot smaller, mail scripts, upload scripts, etc. Little nobranier 100 liner stuff. I don't see the need in getting more fancy for my crappy little websites
![[Linked Image]](https://ubbdev.com/ubb/smilies/frown.gif)
Your mileage will vary.
Anyhow, point was that "Perhaps "generally not a good approach" was a poor choice of words" was a correct statement. Using die 'message'; is perfectly acceptable depending on circumstances. maybe just not in yours
![[Linked Image]](https://ubbdev.com/ubb/smilies/smile.gif)
------------------
"There is no spoon" is back.
This message has been edited by navaho on December 09, 2000 at 09:47 PM